import Vue from 'vue'
import VueRouter from 'vue-router';
Vue.use(VueRouter);
import HomePage from '../views/HomePage'
import CategoryPage from '../views/CategoryPage'
// 使用
// 引入组件

// 创建路由规则
var routes = [{
    path: '/',
    component: HomePage
}, {
    path: '/categorypage',
    component: CategoryPage
}]

// 创建router
var router = new VueRouter({
    routes
})
export default router